﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AccessorialCharges.aspx.cs"
    Inherits="WMS6.Web.Billing.AccessorialCharges" meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>AccessorialCharges</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" id="js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/Verification.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script type="text/javascript">
        //初始化页面
        window.onload = function() {
            initEditNewPage();
        }      
    </script>

</head>
<body>
    <form id="F9181" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblOwner" runat="server" CssClass="label_header" Text="附加费设置" meta:resourcekey="lblOwner"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnGoBack" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnGoBack%>"
                            Enabled="False" OnClick="btnGoBack_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnAccessorialChargesOrders" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnAccessorialChargesOrders%>"
                            OnClick="btnAccessorialChargesOrders_Click" Enabled="False" />
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div>
                    <asp:Label ID="lblMsg" runat="server" CssClass="label_message" meta:resourcekey="lblMsg"></asp:Label>
                </div>
                <div id="div_menu">
                    <div style="float: left; width: 8px;">
                        <div class="tabL" id="divL1">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur" onclick="setTab('one',1,3)"
                        id="divM1">
                        <asp:Label ID="one1" CssClass="hover" runat="server" meta:resourcekey="one1">&nbsp;基本信息&nbsp;</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR" id="divR1">
                        </div>
                    </div>
                    <div style="float: left; width: 8px;">
                        <div class="tabL_1" id="divL2">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur_1" onclick="setTab('one',2,3);"
                        id="divM2">
                        <asp:Label ID="one2" CssClass="navigationlabel" runat="server" meta:resourcekey="one2">&nbsp;明细信息&nbsp;</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR_1" id="divR2">
                        </div>
                    </div>
                    <div style="float: left; width: 8px;">
                        <div class="tabL_1" id="divL3">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur_1" onclick="setTab('one',3,3);"
                        id="divM3">
                        <asp:Label ID="one3" CssClass="navigationlabel" runat="server" meta:resourcekey="one3">&nbsp;已有附加费&nbsp;</asp:Label></div>
                    <div style="float: left; margin-right: 3px;">
                        <div class="tabR_1" id="divR3">
                        </div>
                    </div>
                </div>
                <div id="div_content">
                    <div id="con_one_1" style="display: block;">
                        <table width="720px" style="margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td width="180">
                                    <asp:Label ID="lblOrderID" runat="server" CssClass="label" Text="编号" meta:resourcekey="lblOrderID"></asp:Label>
                                </td>
                                <td width="180">
                                    <asp:Label ID="lblOwnerID" runat="server" CssClass="label" Text="货主" meta:resourcekey="lblOwnerID"></asp:Label>
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtOrderID" runat="server" CssClass="textbox" Enabled="False" MaxLength="20"
                                        meta:resourcekey="txtOrderID"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtOwnerID" runat="server" CssClass="textbox" Enabled="False" meta:resourcekey="txtOwnerID"></asp:TextBox>
                                </td>
                                <td>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td width="180">
                                    <asp:Label ID="lblType" runat="server" CssClass="label" Text="单据类型" meta:resourcekey="lblType"></asp:Label>
                                </td>
                                <td width="180">
                                    <asp:Label ID="lblStatus" runat="server" CssClass="label" Text="状态" meta:resourcekey="lblStatus"></asp:Label>
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtType" runat="server" CssClass="textbox" Enabled="False" meta:resourcekey="txtType"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtStatus" runat="server" CssClass="textbox" Enabled="False" meta:resourcekey="txtStatus"></asp:TextBox>
                                </td>
                                <td>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td width="180">
                                    <asp:Label ID="lblAccessorialType" runat="server" CssClass="label" Text="附加费类型" meta:resourcekey="lblAccessorialType"></asp:Label>
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtAccessorialType" runat="server" CssClass="textbox" Enabled="False"
                                        meta:resourcekey="txtAccessorialType"></asp:TextBox>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td width="180">
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="con_one_2" style="display: none; overflow-x: auto; overflow-y: hidden;">
                        <table width="1080px" style="display: block; margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Button ID="btnAccessorialCharges" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnAccessorialCharges%>"
                                                    OnClick="btnAccessorialCharges_Click" Enabled="False"   />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div>
                                        <asp:GridView ID="gvReceiptDetail" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                                            CssClass="gridview" DataKeyNames="OrderID,OrderLineID,SkuID,Lot,Qty" Width="800px" oninit="gvReceiptDetail_Init" 
                                            OnRowDataBound="gvReceiptDetail_RowDataBound" OnPageIndexChanging="gvReceiptDetail_PageIndexChanging"
                                            meta:resourcekey="gvReceiptDetail">
                                            <FooterStyle CssClass="GridViewFooterStyle" />
                                            <RowStyle CssClass="GridViewRowStyle" />
                                            <HeaderStyle CssClass="GridViewHeaderStyle" />
                                            <PagerStyle CssClass="GridViewPageStyle" />
                                            <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                            <Columns>
                                                <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="No">
                                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                                </asp:BoundField>
                                                <asp:TemplateField meta:resourcekey="TemplateField">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvReceiptDetail');"
                                                            meta:resourcekey="CheckBox1" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chbSelect" runat="server" meta:resourcekey="chbSelect" />
                                                    </ItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvReceiptDetail');"
                                                            meta:resourcekey="CheckBox2" />
                                                    </FooterTemplate>
                                                    <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                    <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="OrderLineID" HeaderText="行号" FooterText="行号" SortExpression="OrderLineID"
                                                    meta:resourcekey="OrderLineID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="OwnerID" HeaderText="货主" FooterText="货主" SortExpression="OwnerID"
                                                    meta:resourcekey="OwnerID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="SkuID" HeaderText="货品" FooterText="货品" SortExpression="SkuID"
                                                    meta:resourcekey="SkuID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:TemplateField FooterText="货品描述" HeaderText="货品描述" SortExpression="SkuDescr"
                                                    meta:resourcekey="SkuDescr">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblSkuDescr" runat="server" Text='<%# Eval("SkuDescr").ToString() %>'
                                                            meta:resourcekey="lblSkuDescr"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_200" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="PackID" HeaderText="包装" FooterText="包装" SortExpression="PackID"
                                                    meta:resourcekey="PackID">
                                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="UomID" HeaderText="单位" FooterText="单位" SortExpression="UomID"
                                                    meta:resourcekey="UomID">
                                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="Lot" HeaderText="批次" FooterText="批次" SortExpression="Lot"
                                                    meta:resourcekey="Lot">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="Status" HeaderText="状态" FooterText="状态" SortExpression="Status"
                                                    meta:resourcekey="Status">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:TemplateField FooterText="数量" HeaderText="数量" SortExpression="Qty" meta:resourcekey="Qty">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblQty" runat="server" Text='<%# GetPreferenceDigit(Eval("Qty").ToString()) %>'
                                                            meta:resourcekey="lblQty"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr style="height: 30px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="con_one_3" style="display: none; overflow-x: auto; overflow-y: hidden;">
                        <table width="1080px" style="display: block; margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Button ID="btnAccessorialDelete" runat="server" CssClass="button" Enabled="False"
                                                    Text="<%$Resources:ButtonResource,btnAccessorialDelete%>" OnClientClick="javascript: if(confirm('确定要删除这条记录吗?')){return true;} else{ return false;}"
                                                    OnClick="btnAccessorialDelete_Clikc"   />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div>
                                        <asp:GridView ID="gvAccessorialChatgesDetail" runat="server" AllowSorting="True" oninit="gvAccessorialChatgesDetail_Init" 
                                            OnRowDataBound="gvAccessorialChatgesDetail_RowDataBound" OnPageIndexChanging="gvAccessorialChatgesDetail_PageIndexChanging"
                                            AutoGenerateColumns="False" AllowPaging="True" CssClass="gridview" DataKeyNames="OrderID,OrderLineID,AccessorialChargesID"
                                            Width="800px" meta:resourcekey="gvAccessorialChatgesDetail">
                                            <FooterStyle CssClass="GridViewFooterStyle" />
                                            <RowStyle CssClass="GridViewRowStyle" />
                                            <HeaderStyle CssClass="GridViewHeaderStyle" />
                                            <PagerStyle CssClass="GridViewPageStyle" />
                                            <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                            <Columns>
                                                <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="No">
                                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                                </asp:BoundField>
                                                <asp:TemplateField meta:resourcekey="TemplateFieldResource4">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvAccessorialChatgesDetail');"
                                                            meta:resourcekey="CheckBox1Resource2" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chbSelect" runat="server" meta:resourcekey="chbSelectResource2" />
                                                    </ItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvAccessorialChatgesDetail');"
                                                            meta:resourcekey="CheckBox2Resource2" />
                                                    </FooterTemplate>
                                                    <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                    <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="AccessorialChargesID" HeaderText="附加费编号" FooterText="附加费编号"
                                                    SortExpression="AccessorialChargesID" meta:resourcekey="AccessorialChargesID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="OrderID" HeaderText="单据编号" FooterText="单据编号" SortExpression="OrderID"
                                                    meta:resourcekey="OrderID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:TemplateField FooterText="单据行号" HeaderText="单据行号" SortExpression="OrderLineID"
                                                    meta:resourcekey="OrderLineID">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblOrderLineID" runat="server" Text='<%# ConvertLine(Eval("OrderLineID").ToString()) %>'
                                                            meta:resourcekey="lblOrderLineID"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="OwnerID" HeaderText="货主" FooterText="货主" SortExpression="OwnerID"
                                                    meta:resourcekey="OwnerID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <%--<asp:BoundField DataField="GeneralLedgerID" HeaderText="总账分配" FooterText="总账分配" SortExpression="GeneralLedgerID"
                                                    meta:resourcekey="GeneralLedgerID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>--%>
                                                <asp:BoundField DataField="BillingObjectDescr" HeaderText="对象类型" FooterText="对象类型" SortExpression="BillingObjectDescr"
                                                    meta:resourcekey="BillingObjectDescr">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="BillingObjectID" HeaderText="计费对象" FooterText="计费对象" SortExpression="BillingObjectID"
                                                    meta:resourcekey="BillingObjectID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="RateID" HeaderText="费率" FooterText="费率" SortExpression="RateID"
                                                    meta:resourcekey="RateID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="BillingQty" HeaderText="计费数量" FooterText="计费数量" SortExpression="BillingQty"
                                                    meta:resourcekey="BillingQty">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="BillingAmount" HeaderText="金额" FooterText="金额" SortExpression="BillingAmount"
                                                    meta:resourcekey="BillingAmount">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr style="height: 30px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <input type="hidden" id="hdnFlag" runat="server">
                    <input id="hdnLineID" runat="server" type="hidden"></input>
                    <input id="hdnAccessorialChargesID" runat="server" type="hidden"></input>
                    <input id="hdnType" runat="server" type="hidden"></input>
                </input>
                </input> </input> </input>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <input type="hidden" id="hdnFrom" runat="server" />
    </form>
</body>
</html>
